<div id="pft_divSWFUploadUI">
	<table>
		<tr>
			<td width="100%">
				<div class="fieldset flash" id="pft_fsUploadProgress">
				<span class="legend">Upload Queue</span>
				</div>
				<p id="divStatus">0 Files Uploaded</p>
				<p>
					<span id="pft_spanButtonPlaceholder"></span>
					<input id="pft_btnCancel" type="button" value="Cancel All Uploads" disabled="disabled" style="margin-left: 2px; height: 22px; font-size: 8pt;" />
					<input id="pft_btnUpload" type="button" value="Upload" style="margin-left: 2px; height: 22px; font-size: 8pt;" onclick="javascript:handleUpload();"/>
				</p>
			</td>
		</tr>
	</table>

</div>

<div id="divFileProgressContainer" style="height: 75px;"></div>


<script>
	function handleUpload() {
		 //var j = jQuery.noConflict();
		 //var dashboardType = j('input:radio[name=dashboardType]:checked').val();
	    //var templateType = j('input:radio[name=templateType]:checked').val();
	    var fileType = "SIMPLE_TYPE";
		swfu.setPostParams({
			fileType:fileType
		});
		swfu.startUpload();
	}


	var pftSettings = {
		flash_url : "assets/swfupload/swfupload.swf",
		upload_url : "services/upload"+"?mediUser="+ mediUser+"&mediPass="+mediEncryptedPassword+"&identifier="+identifier+"&isAdmin="+isAdmin,
		file_size_limit : "100 MB",
		file_types : "*.xls",
		file_types_description : "All Files",
		file_upload_limit : 100,
		file_queue_limit : 10,
		custom_settings : {
			progressTarget : "pft_fsUploadProgress",
			cancelButtonId : "pft_btnCancel"
		},
		debug : false,

		// Button settings
		//button_image_url : "assets/images/addFiles.png",
		//button_width : "90",
		//button_height : "22",
		//button_placeholder_id : "pft_spanButtonPlaceholder",
		button_image_url : "assets/swfupload/SmallSpyGlassWithTransperancy_17x18.png",
		button_placeholder_id : "pft_spanButtonPlaceholder",
		button_width: 180,
		button_height: 18,
		button_text : '<span class="button">Select Files <span class="buttonSmall">(100 MB Max)</span></span>',
		button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }',
		button_text_top_padding: 0,
		button_text_left_padding: 18,
		button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
		button_cursor: SWFUpload.CURSOR.HAND,			
		
		// The event handler functions are defined in handlers.js
		file_queued_handler : fileQueued,
		file_queue_error_handler : fileQueueError,
		upload_start_handler : uploadStart,
		upload_progress_handler : uploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : uploadSuccess
	};

	swfu = new SWFUpload(pftSettings);

</script>